<?php
/**
 * CodeIgniter
 *
 * An open source application development framework for PHP 5.1.6 or newer
 *
 * @package		CodeIgniter
 * @author		ExpressionEngine Dev Team
 * @copyright	Copyright (c) 2008 - 2011, EllisLab, Inc.
 * @license		http://codeigniter.com/user_guide/license.html
 * @link		http://codeigniter.com
 * @since		Version 1.0
 * @filesource
 */

// ------------------------------------------------------------------------

/**
 * CodeIgniter String Helpers
 *
 * @package		CodeIgniter
 * @subpackage	Helpers
 * @category	Helpers
 * @author		ExpressionEngine Dev Team
 * @link		http://codeigniter.com/user_guide/helpers/string_helper.html
 */

// ------------------------------------------------------------------------

class Core_Helper_Io
{
	static function scan($curdir)
	{
		if(!is_dir($curdir))
			return array();
		
		$folders 	= array();
		$files		= array();
		foreach(scandir($curdir) as $name)
		if(($name!=='.')&&($name!=='..'))
		{
			if(is_file($curdir.$name))
			{
				$files[] = $name;
			}
			else
			{
				$folders[] = $name;
			}
		}
		return array_merge($folders, $files);
	}
}

/* End of file string_helper.php */
/* Location: ./system/helpers/string_helper.php */